package com.suke.czx.modules.file.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.suke.czx.common.validate.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 应用模块名称: 文件
 * 代码描述: 文件实体
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2021/09/07 23:02
 */
@Data
@ApiModel(value = "文件管理")
@EqualsAndHashCode(callSuper = true)
public class File extends Model<File> {

    @ApiModelProperty(value = "文件id")
    @TableId(value = "file_id", type = IdType.AUTO)
    @NotNull(groups = {FileUpdateGroup.class}, message = "文件编码不能为空")
    public Long fileId;

    @ApiModelProperty(value = "文件名称")
    @NotNull(groups = {FileSaveGroup.class, FileUpdateGroup.class}, message = "文件名称不能为空")
    public String fileName;

    @ApiModelProperty(value = "文件地址")
    @NotNull(groups = {FileSaveGroup.class, FileUpdateGroup.class}, message = "文件地址不能为空")
    public String fileUrl;

    @ApiModelProperty(value = "备注")
    public String note;

    @ApiModelProperty(value = "删除标记  0：删除   1：正常")
    public Integer del;

    @ApiModelProperty(value = "创建者id")
    public Long creator;

    @ApiModelProperty(value = "创建时间")
    public Date createTime;

    @ApiModelProperty(value = "更新者id")
    public Long updater;

    @ApiModelProperty(value = "更新时间")
    public Date updateTime;

}
